package Day07.Demo05;

import java.util.ArrayList;
import java.util.Random;

/**
 * @author HYHwtx
 * @version 1.0
 * @date 2022/2/7 15:08
 */
public class Demo01ArrayListRandom {
    public static void main(String[] args) {
        ArrayList<Integer> list = new ArrayList<>();
        Random r = new Random();
        for (int i = 0; i <6 ; i++) {
            int num = r.nextInt(33)+1;
            list.add(num);
        }
        //遍历集合
        for (int i = 0; i < list.size(); i++) {
            System.out.println(list.get(i));
        }
    }
}